using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmDeliveryNote")]
    public class DeliveryNote
    {
        public DeliveryNote()
        {
        }
    

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "DnId", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public int DnId { get; set; }

        [ForeignKey("PurchaseOrder")]
		[DataMember, Display(Name = "PoId", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> PoId { get; set; }

        [ForeignKey("PurchaseOrderInstallment")]
		[DataMember, Display(Name = "PoInstallId", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> PoInstallId { get; set; }

        [DataMember, Display(Name = "Code", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public string Code { get; set; }

        [DataMember, Display(Name = "Name", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public string Name { get; set; }

        [DataMember, Display(Name = "Descr", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public string Descr { get; set; }

		[DataMember, Display(Name = "ReceiveDate", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<System.DateTime> ReceiveDate { get; set; }

		[DataMember, Display(Name = "InvoiceNumber", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public string InvoiceNumber { get; set; }

		[DataMember, Display(Name = "InvoiceDate", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<System.DateTime> InvoiceDate { get; set; }

        [ForeignKey("Warehouse")]
		[DataMember, Display(Name = "WhId", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> WhId { get; set; }

		[DataMember, Display(Name = "DocumentNumber", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public string DocumentNumber { get; set; }

		[DataMember, Display(Name = "RedemptionAmount", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<double> RedemptionAmount { get; set; }

		[DataMember, Display(Name = "DeductionAmount", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<double> DeductionAmount { get; set; }

		[ForeignKey("YearType")]
		[DataMember, Display(Name = "YearTypeId", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> YearTypeId { get; set; }

		[DataMember, Display(Name = "BgmYear", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> BgYear { get; set; }

		[DataMember, Display(Name = "DeliveryDate", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<System.DateTime> DeliveryDate { get; set; }

		[ForeignKey("DeliveryEmp")]
		[DataMember, Display(Name = "DeliveryEmpId", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> DeliveryEmpId { get; set; }

		[ForeignKey("DeliveryJobSite")]
		[DataMember, Display(Name = "DeliveryJobSiteId", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> DeliveryJobSiteId { get; set; }

		[DataMember, Display(Name = "DeliveryPlace", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public string DeliveryPlace { get; set; }


        [ForeignKey("Progress")]
		[DataMember, Display(Name = "ProgId", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> ProgId { get; set; }

        [ForeignKey("TransectionGroup")]
		[DataMember, Display(Name = "TranGrpId", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> TranGrpId { get; set; }

        [ForeignKey("ProjectOperationExpense")]
		[DataMember, Display(Name = "Expenses", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> ProjOperExpId { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        [DataMember, Display(Name = "ChkTaxInvoice", ResourceType = typeof(Resources.DeliveryNoteResource))]
        public Nullable<bool> ChkTaxInvoice { get; set; }

        [DataMember]
        public virtual BGM.ProjectOperationExpense ProjectOperationExpense { get; set; }

        [DataMember]
        public virtual PurchaseOrder PurchaseOrder { get; set; }

        [DataMember]
        public virtual PurchaseOrderInstallment PurchaseOrderInstallment { get; set; }

        [DataMember]
        public virtual Warehouse Warehouse { get; set; }

        [DataMember]
		public virtual SYS.YearType YearType { get; set; }

        [DataMember]
		public virtual HRM.Employee DeliveryEmp { get; set; }

        [DataMember]
        public virtual HRM.JobSite DeliveryJobSite { get; set; }

        [DataMember]
        public virtual IcmMasLookUp Progress { get; set; }

        [DataMember]
        public virtual ACM.TransectionGroup TransectionGroup { get; set; }

    }
}